//============================================================================
//
//  VertexDecl.h
//  
//  Created By Jeromy Stroh 2009
//
//============================================================================
#pragma once

#include <list>

enum DXGI_FORMAT;
struct D3D11_INPUT_ELEMENT_DESC;

namespace d3d11
{
	struct VertexData
	{
		enum DataType
		{
			POSITION,
			COLOUR,
			TEXTURE,
			NORMAL
		};
		uchar Type;
		uchar Format;
		uint Size;
	};
	
	class VertexDecl
	{
	public:
		VertexDecl();
		~VertexDecl();

		void PushVertexData(VertexData::DataType type, DXGI_FORMAT format, uint size);
		void ConstructElementLayout();

		D3D11_INPUT_ELEMENT_DESC  *getElementLayout() { return m_pElemLayout; }
		int getNumElements() { return m_pVertexData.size(); }

	private:
		std::list<VertexData>		m_pVertexData;
		D3D11_INPUT_ELEMENT_DESC	*m_pElemLayout;
	};
}
